package edu.towson.cosc603.coffeemaker;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class RecipeTest {

	private Recipe r1 = new Recipe();
	@Before
	public void setUp() throws Exception {
		r1.setName("Coffee");
        r1.setPrice(50);
        r1.setAmtCoffee(6);
        r1.setAmtMilk(1);
        r1.setAmtSugar(1);
        r1.setAmtChocolate(1);

	}

	@After
	public void tearDown() throws Exception {
	}

	

	@Test
	public void testSetAmtChocolate() {
		r1.setAmtChocolate(-22);
		assertEquals(r1.getAmtChocolate(),0);
	}

	

	@Test
	public void testSetAmtCoffee() {
		r1.setAmtCoffee(-5);
		assertEquals(r1.getAmtCoffee(),0);
	}

	

	@Test
	public void testSetAmtMilk() {
		r1.setAmtMilk(-4);
		assertEquals(r1.getAmtMilk(),0);
	}

	
	@Test
	public void testSetAmtSugar() {
		r1.setAmtSugar(-1);
		assertEquals(r1.getAmtSugar(),0);
	}



	@Test
	public void testGetPrice() {
		assertEquals(r1.getPrice(),50);
	}

	@Test
	public void testSetPrice() {
		r1.setPrice(-90);
		assertEquals(r1.getPrice(),0);
	}



}
